package com.central.scheduler.dao.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.central.db.mapper.SuperMapper;
import com.central.scheduler.dao.model.MasterServer;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author Tindy
 * @date 2021/11/17
 * @describe
 */
@Mapper
public interface MasterServerMapper extends SuperMapper<MasterServer> {
    @Select("select * from sch_master_server where host=#{host}")
    MasterServer findByHost(@Param("host") String host);

    List<MasterServer> findMasters(Page<MasterServer> page, @Param("u") Map<String, Object> params);

}
